﻿namespace gysgbs
{
    internal class Program
    {
        static void Main(string[] args)
        {
          
                Console.Write("请输入第一个正整数m：");
                int m = int.Parse(Console.ReadLine());
                Console.Write("请输入第二个正整数n：");
                int n = int.Parse(Console.ReadLine());

                int M = m;
                int N = n;

                
                while (n != 0)
                {
                    int temp = n;
                    n = m % n;
                    m = temp;
                }
                int gys = m; 

               
                int gbs = M * N /gys;

                Console.WriteLine("最大公约数：" + gys);
                Console.WriteLine("最小公倍数：" + gbs);
            }
        }
    }
 
